package com.ark.cloud.javacallnative.modules.storage.service.impl;

import com.ark.cloud.javacallnative.entity.GuideCmd;
import com.ark.cloud.javacallnative.modules.storage.mapper.GuideCmdMapper;
import com.ark.cloud.javacallnative.modules.storage.service.GuideCmdService;
import com.ark.cloud.javacallnative.util.UUIDUtil;
import org.apache.tomcat.util.buf.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * @author fukun
 * @create 2021/9/2  下午6:30
 * @description
 */
@Service
public class GuideCmdServiceImpl implements GuideCmdService {
    @Autowired
    GuideCmdMapper guideCmdDao;
    @Override
    public void saveGuideCmdInfo(GuideCmd guideCmd) {
        guideCmd.setId(UUIDUtil.next());
        guideCmd.setUnitList(StringUtils.join(guideCmd.getGuidedUnitList()));

        guideCmdDao.saveGuideCmdInfo(guideCmd);

    }
}
